package com.watercloud.service.impl;

import com.pojo.QueryInfo;
import com.pojo.UserInfo;
import com.watercloud.dao.UserDao;
import com.watercloud.service.UserService;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserServiceImpl implements UserService{

    @Autowired
    UserDao userDao;
    @Autowired
    UserDao specifiedUserDao;
    @Override
    public List<UserInfo> selectUserInfo() {
        return userDao.selectUserInfo();
    }

    @Override
    public List<UserInfo> selectSpecifiedUser(QueryInfo queryInfo) {
        return specifiedUserDao.selectSpecifiedUser(queryInfo);
    }

    @Override
    public boolean update(UserInfo userInfo){
        /*接受用户数据反馈相应的结果*/
        int res =  userDao.update(userInfo);
        if(res>0){
            return true;
        }
        else{
            return false;
        }
    }

}
